def main():
    n = int(input())
    if n <= 0:
        print("Invalid input")
        return

    nums = []
    for _ in range(n):
        nums.append(int(input()))

    avg = sum(nums) / n
    count = 0
    for num in nums:
        if num >= avg:
            count += 1

    print(count)


if __name__ == "__main__":
    main()

